﻿using System.Collections.Generic;
using NHibernate;
using Thaire.Investment.Domains.Transaction;

namespace Thaire.Investment.Repository
{
    public class UnitTrustPrivilegeRepo : BaseRepository<UnitTrustPrivilege, int>
    {
        public UnitTrustPrivilegeRepo(ISession session)
            : base(session)
        {
        }
        public List<UnitTrustPrivilege> GetListByHeaderID(int headerId)
        {
            return new List<UnitTrustPrivilege>(_session.QueryOver<UnitTrustPrivilege>()
                .Where(x => x.UnitTrustHeaderID == headerId)
                .OrderBy(x => x.CreateDate).Asc.List());
        }
    }
}
